export default {
  data() {
    return {
      rgbRgbUrl: 'ws://127.0.0.1:8848/wssp',

      allRrealTime: false, // 实时对比总开关
      higeDefinSwitch: false, // 打开高清画质
      allVideoSwitch: false, // 三种视频同事播放按钮
      realTimeDevice: false // 实时人脸按钮  控制实时对比和实时图像
    };
  },
  watch: {
    higeDefinSwitch(nVal, oVal) {
      if (nVal) {
        // 打开高清画质
        const rgb = {
          type: 'video_view_rgb_req', // video_view_rgb_req//video_record_rgb_req
          data: {
            action: 'start', // "start","stop"
            hd: 1 // 0:false, 1:true
          }
        };
        const ir = {
          type: 'video_view_ir_req', // video_view_rgb_req//video_record_rgb_req
          data: {
            action: 'start', // "start","stop"
            hd: 1 // 0:false, 1:true
          }
        };
        const depth = {
          type: 'video_view_depth_req', // video_view_rgb_req//video_record_rgb_req
          data: {
            action: 'start', // "start","stop"
            hd: 1 // 0:false, 1:true
          }
        };
        this.ir_websocket_send(ir);
        this.rgb_websocket_send(rgb);
        this.depth_websocket_send(depth);
      } else {
        // 关闭高清画质
        const rgb = {
          type: 'video_view_rgb_req', // video_view_rgb_req//video_record_rgb_req
          data: {
            action: 'start', // "start","stop"
            hd: 0 // 0:false, 1:true
          }
        };
        const ir = {
          type: 'video_view_ir_req', // video_view_rgb_req//video_record_rgb_req
          data: {
            action: 'start', // "start","stop"
            hd: 0 // 0:false, 1:true
          }
        };
        const depth = {
          type: 'video_view_depth_req', // video_view_rgb_req//video_record_rgb_req
          data: {
            action: 'start', // "start","stop"
            hd: 0 // 0:false, 1:true
          }
        };
        if (oVal) {
          this.ir_websocket_send(ir);
          this.rgb_websocket_send(rgb);
          this.depth_websocket_send(depth);
        }
      }
    },
    allVideoSwitch(nVal, oVal) {
      this.depthSwitch = nVal;
      this.rgbSwitch = nVal;
      this.irSwitch = nVal;
    },
    allRrealTime(nVal, oVal) {
      this.realTimeFace = nVal;
      this.realTimeCompare = nVal;
    }
  }

};
